<!DOCTYPE html>
<html>
    <head>
        <script>
            function sh(e){
                if(zh===''){
                alert("账号不能为空");
                return;
            }else if(mm===''){
                alert("密码不能为空");
                return;
            }else if(zh.length<3){
                alert("账号长度少于 3 位");
                return;
            }else if(mm.length<6){
                alert("密码长度少于 6 位");
                return;
            }else if(zh=='admin&&'&&mm=='123456'){
                window.location.href="C:\Users\联想\Desktop\首页.html";
            }else{
                alert("密码或账号错误");
            }
            }
        </script> 
       
    </head>
    <body> 
        <nav style="background-color: black;color: white;padding: 10px;">
            <a>WHITE</a>
            <a href="tp.html" style="text-decoration: none; color: white; margin-left: 655px;">首页</a>
            <a href="#" style="text-decoration: none; color: white; margin-left:50px ;">关于</a>
            <a href="#" style="text-decoration: none; color: white; margin-left: 50px;">照片集 </a>
            <a href="#" style="text-decoration: none; color: white; margin-left: 50px;">服务</a>
            <a href="#" style="text-decoration: none; color: white; margin-left: 50px;">微博</a>
            <a href="#" style="text-decoration: none; color: white; margin-left: 50px;">联系</a>
            <a href="#" style="text-decoration: none; color: white; margin-left: 50px;">登录</a>
        </nav>
        <form style="text-align:center">
            <table border="1"align="center">
            <tr><td><h1 style="text-align:center;">登录</h1>
            <p><label for="zh" >账号：</label>
            <input type="text" id="zh" name="zh"></p>
            <p><label for="mm">密码：</label>
            <input type="text" id="mm" name="mm"></p>
            
            <p><input type="button"  value="登录" onclick="sh()"></p>
        </td></tr>
        </table>
        </form>
    </body>
</html>